package com.xxx.codegen.config;

import com.baomidou.dynamic.datasource.creator.DataSourceCreator;
import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Alay
 * @date 2021-07-08 00:51
 * @project CodeGenerator
 */
@Configuration
public class CodeGenConfig {

    @Bean
    public StringEncryptor stringEncryptor() {
        StandardPBEStringEncryptor stringEncryptor = new StandardPBEStringEncryptor();
        return stringEncryptor;
    }

    @Bean
    public DataSourceCreator dataSourceCreator() {
        DataSourceCreator dataSourceCreator = new DataSourceCreator();
        return dataSourceCreator;
    }
}
